<?php
$phone_number=37282879541;
$method='inc';
//https://service.smart-sim.ru:443/api/37282879541/balance?uname=paul&upass=kam9345t
//https://service.smart-sim.ru:443/api/37282879541/inc?uname=paul&upass=kam9345t&amount=5&cur=EUR&trid=4565465464654
function check($phone_number, $method)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://service.smart-sim.ru:443/api/".$phone_number."/".$method."?uname=paul&upass=kam9345t&amount=5&cur=EUR&trid=".mt_rand());
    curl_setopt($ch, CURLOPT_FAILONERROR, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 3);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "");
//    curl_setopt($ch, CURLOPT_INTERFACE, "192.168.1.104");
//    curl_setopt($ch, CURLOPT_INTERFACE, "88.196.96.108");

    $result = curl_exec($ch);
    $info = curl_getinfo($ch);
    curl_close($ch);

    echo '<pre>';
    print_r($info);
    print_r($result);
    echo '</pre>';

    if ($info['http_code'] != 200) {
        echo "HTTP: " . $info['http_code'];
    }
    $xml = simplexml_load_string($result);
    //return $xml;
    echo '<pre>';
    print_r($xml);
    echo '</pre>';
}
check($phone_number, $method); 
?>